ABOUTDEVELOPERS |
SpatialStream® Code Examples
Polygon Drawing
Every mapping application needs complex drawing tools. The SpatialStream® API provides access to sophisticated drawing tools for you spatial application. SpatialStream® allows you to integrate functionality to add, edit, delete and move spatial shapes such as points, polygons, lines and text. This example shows the process of adding a new user defined polygon.
The primary benefit of use the SpatialStream editing tools is that they are ready to use and are fully compatible with the SpatialStream® OperationsManager functional component allowing you to equip your site with Undo and Redo. They are also compatible with the SpaitalStream® TransactionEngine functional component. Drawing Tools
markupFeatureLayer = new FeatureLayer(new RecordSet(["ID"]), "Markup", map);
selectionSet = new SelectionSet(map); //---------------- drawCommand = new DMCDrawPolygonCommand(map, selectionSet, markupFeatureLayer, SYMBOLIZERS.POLYGON()); drawCommand.getEventManager().addCallback("onDeactivate", cancelDrawing); drawCommand.execute(); Run Sample View Video Back To Index |